<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    <link type="text/css" rel="stylesheet" th:href="@{/css/style.css}"/>
</head>
<body>
/templates/empedit.html<br/>
<form th:action="@{/emp}" method="post">
    <input type="hidden" name="_method" value="put"/>
    员工编号<input type="text" name="eid" th:value="${emp.eid}" /><br/>
    员工姓名<input type="text" name="ename" th:value="${emp.ename}"/><br/>
    入职日期<input type="text" name="hiredate" th:value="${#dates.format(emp.hiredate, 'yyyy-MM-dd')}"/><br/>
    所属部门<select name="dep.did">
    <option th:each="dep:${deps}"
            th:value="${dep.did}"
            th:selected="${emp.dep.did==dep.did}">
        [[${dep.dname}]]</option>
</select><br/>
    <input type="submit" value="修改员工"/>
</form>
</body>
</html>